/** @type {import('next').NextConfig} */
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);

const nextConfig = {
  eslint: {
    ignoreDuringBuilds: true,
  },
  typescript: {
    ignoreBuildErrors: true,
  },
  images: {
    unoptimized: true,
  },
  // 优化构建性能
  webpack: (config) => {
    // 增加缓存
    config.cache = { type: 'filesystem', buildDependencies: { config: [__filename] } }
    return config;
  },
}

export default nextConfig
